home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / BUS / DynRisk 68k 4.01 demo.sit / DynRisk-Help.rsrc / TEXT_6519.txt < prev    next >
Text File  |  1996-08-30  |  1KB  |  19 lines

  1. Round
  2.  
  3. The Round function. This function lets you replace a linear function of the input value by the closest integer, multiplied by a constant. The function respects the usual 窶œ.5窶 convention. Thus, the closest integer to e.g., 14.5 is 15, while the closest integer to e.g., -14.5 is 14.
  4.  
  5. By adjusting the parameters, you can create a large variety of round-off rules. Assume, e.g., that you want to replace the input value by the closest multiple of 0.5. To do this, enter 0.5 into the 窶彗窶 field, 2 into the 窶彙窶 field, and 0 into the 窶彡窶 field.
  6.  
  7. More generally, let A be a positive number. To replace the input value by the closest multiple of A, enter A into the 窶彗窶 field, 1/A into the 窶彙窶 field, and 0 into the 窶彡窶 field. 
  8.  
  9. You may enter negative parameter values as well. Note however, that the resulting rule reverses the 窶œ.5窶 convention. Assume e.g., that you enter -1 both in the 窶彗窶 and the 窶彙窶 fields. Then an input value of 14.5 yields an output value of 14, while an input value of -14.5 yields an output value of -15.
  10.  
  11. Default parameter values:
  12.     a = 1, b = 1, c = 0
  13.  
  14. Example:
  15.     a = 10, b = 0.1, c = 0
  16.  
  17.     Input = 42  =>  Output = 40
  18.     Input = 56  =>  Output = 60
  19.